package com.boost.network;

import java.net.URLDecoder;
import java.net.URLEncoder;

public class URLDecoderTest {
    public static void main(String[] args) throws Exception {


        //将普通字符串 转application/x-www-form-urlencoded 字符串
        String enode= URLEncoder.encode("你好","GBK");
        System.out.println(enode);
        //将application/x-www-form-urlencoded 字符串
        //转换成普通字符串
        //其中的字符串直接从图 17.3 所示的窗口中复制过来
        String keyWorld= URLDecoder.decode(enode,"GBK");
        System.out.println(keyWorld);
    }
}
